const addon = require('../build/Release/image-to-matrix-native');

export function imageToMatrix(data: Buffer | string, type: "RGB" | "RGBA" | "RGB565"): Buffer {
    if (typeof data === "string") {
        return addon.imageToMatrixPath(data, type);
    }
  return addon.imageToMatrixBuffer(data, type);
}

export default imageToMatrix;
